package net.apexes.commons.lang;

import java.nio.charset.StandardCharsets;

/**
 * @author hedyn
 */
public class AsciiRadixCoderDemo {

    public static void main(String[] args) {
        String text = "ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();";
        byte[] bytes = text.getBytes(StandardCharsets.UTF_8);

        System.out.println(text);

        System.out.println();
        System.out.println("base36 ---------");
        AsciiRadixCoder base36 = AsciiRadixCoder.of("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
        String s = base36.encode(bytes);
        System.out.println(s);
        System.out.println(new String(base36.decode(s)));

    }
}
